import request from "@/utils/request";
var baseUrl = '/admin/contrResource/'

export function getAllController(data) {
  return request({
    url: baseUrl+'findList',
    method: 'post',
    data: data
  })
}

export function updateController(data) {
  return request({
    url: baseUrl+'update',
    method: 'post',
    data: data
  })
}

export function addController(data) {
  return request({
    url: baseUrl+'add',
    method: 'post',
    data: data
  })
}

export function detailController(id) {
  return request({
    url: baseUrl+'detail',
    method: 'get',
    params: {id}
  })
}

export function closeController(id) {
  return request({
    url: baseUrl+'close',
    method: 'post',
    params: {id}
  })
}

export function openController(id) {
  return request({
    url: baseUrl+'open',
    method: 'post',
    params: {id}
  })
}
